import {memberList} from '../../../util/request/api'

const state={
    memberlist:[]
}
const getters={
    getMemberList(state){
        return state.memberlist
    }
}
const actions={
    getMemberAction({commit}){
        memberList()
        .then(res=>{
            if(res.code==200){
                commit('REQ_MEMBERLIST',res.list)
            }
        })
    }
}
const mutations={
    REQ_MEMBERLIST(state,payload){
        state.memberlist=payload
    }
}

export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}